<template>
  <div>App根组件 -----{{count}}</div>
  <button type="button" class="btn-success" @click="count++">+</button>
  <hr />
  <my-son v-model:num="count"></my-son>
</template>

<script>
import MySon from './Son.vue';
export default {
  name: 'MyApp',
  components: {
    MySon
  },
  data() {
    // 子组件向父组件传递数据 props
    return {
      count: 0
    };
  }
};
</script>

<style>
</style>